Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 4733d6d75a28ec07f13cfd8920c4ce59d48fde29


Parents : c823554
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Date : 2026-05-03T18:34:58+02:00

Strip trailing whitespace from templates

Changes

1 files changed, 2 insertions(+), 2 deletions(-)


Diff

diff --git a/RNS/Utilities/rngit/pages.py b/RNS/Utilities/rngit/pages.py
index 4dcccf09..9f22ae88 100644
--- a/RNS/Utilities/rngit/pages.py
+++ b/RNS/Utilities/rngit/pages.py
@@ -193,7 +193,7 @@ class NomadNetworkNode():
if os.access(path, os.X_OK):
try:
result = subprocess.run([path], stdout=subprocess.PIPE)
- template = result.stdout.decode("utf-8")
+ template = result.stdout.decode("utf-8").rstrip()
return template
except Exception as e:
@@ -202,7 +202,7 @@ class NomadNetworkNode():
else:
try:
- with open(path, "rb") as fh: return fh.read().decode("utf-8")
+ with open(path, "rb") as fh: return fh.read().decode("utf-8").rstrip()
except Exception as e:
RNS.log(f"Could not get static template content from {path}: {e}", RNS.LOG_ERROR)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────